package com.groupbuying.pushordermsg.controller;


import com.groupbuying.pushordermsg.service.PushMessageService;
import com.groupbuying.pushordermsg.util.apiresult.ApiResult;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@Controller
@RequestMapping("/msgpush")
@CrossOrigin
public class PushMessageController {


    protected static final Logger logger = LoggerFactory.getLogger(PushMessageController.class);

    @Autowired
    private PushMessageService pushMessageService;


    /**
     * @api {post} /orderMessagePush 获取用户信息
     * @apiExample author wenguoqiang
     * tar 调用方： 订单中心
     * date 2019/12/19 0019 上午 10:35
     * @apiGroup
     * @apiVersion 1.0.0
     * @apiHeader
     * @apiParam {String} storeUuid  商户号 {String} orderAmount  订单金额
     * @apiSuccess {Integer} code 请求结果 0-失败 1-成功
     * @apiSuccess {String} result 请求结果
     */
    @PostMapping("/orderMessagePush")
    @ResponseBody
    public ApiResult orderMessagePush(String storeUuid, String orderAmount) throws Exception {

        return pushMessageService.pushMessage(storeUuid,orderAmount);

    }


}
